Setting up Mac for iOS
Before you can use iOS deployment, you have to install the appropriate iOS SDKs that available from Apple. You have to register as an iPhone Developer with Apple before you can download and work with the iPhone SDK. You can register for this and download the SDK by visiting: http://developer.apple.com/ios Depending on the version of you Mac, these are the correct combination: The recommended OS at the present are Mavericks and Yosemite. As a registered iOS developer you can develop and run applications in the iPhone Simulator only. To build applications that can be run on an actual device you have to enroll in the iOS Developer Program. Configuring Livecode After you have installed one or more iOS SDKs, it is necessary to tell LiveCode where to find them: To configure the paths to your installed SDKs, use the Mobile Support panel in Preferences. Use this pane to choose the correct SDK paths by using the ‘Add entry’ button. You should choose the folder you selected when installing the SDK (for Xcode versions 4.2 and earlier) or the Xcode app bundle (for Xcode version 4.3 and later). When you have successively chosen your SDK(s), the list of simulators and SDKs that you have available is updated. Note: On startup if SDKs have not been previously configured, LiveCode checks to see if there is a recognized SDK at /Developer and /Applications. Testing in the iOS simulator To make a stack build for iOS, check the Build for iOS button and configure any options that you wish in the stand alone application settings of your stack. Once you have a stack configured for iOS, you can run it in the iOS Simulator by using the Test button on the menubar: This button is enabled for any stack that has been configured for iOS deployment, and clicking it launches the stack in the simulator, terminating a running simulation if any. You can also access the Test action from the Development menu. Additionally this is where you can configure which target iOS simulator to use: Here you can choose which simulated device to use for iOS testing. Any setting you choose here takes effect the next time you use the Test button or menu-item. Note: If the Test button or menu-item remains disabled, even if you have configured a stack for iOS deployment, it probably means you have not configured your SDKs correctly. In this case, check that there are available simulators in the Mobile Support pane of Preferences. Building for a Real Device on iOS Before you can begin testing your application on a real device, you must have several things in place: # Enrollment in the iPhone Developer Program: this is required so you can generate the necessary certificates and profiles. #An iPhone Developer Certificate: this is installed on your development machine and is used to digitally sign the application you wish to put onto an iPhoneOS device. Follow the instructions on the Certificates tab of the iPhone Developer Program Portal. #Registration of at least one iPhoneOS device in the program portal. You can add devices using the Devices tab of theiPhone Developer Program Portal. #A provisioning profile that ties together the id of your test device, your app id and your certificate. These can be created using the Provisioning tab of iPhone Developer Program Portal. #An App ID for your application. You can create App IDs using the App IDs tab of the iPhone Developer Program Portal. Note: At this stage it is not necessary for you to have a separate App ID for every app – you can use a single ID for all your apps for testing/development purposes. Once you have all of these points in place, you should find that the Profile drop-down menu in the iOS pane of the Standalone Settings dialog is populated with any Provisioning Profiles you have installed. With a suitable profile chosen, you can use the Save as Standalone Application… item in the File menu to build an iOS app bundle in the same was as you would build a standalone for any other platform. Next install the bundle on your test device. To do this, start up Xcode, and choose Window > Organizer. This brings up an interface allowing you to manage the applications, devices and profiles you are using for development. Next, make sure you have your test device connected to your machine and choose it from the left hand list. If you have not used the device for development before, you are prompted to do so, and you are then be presented with a list of installed applications. To get your newly prepared application on the device, drag the application bundle from the desktop into the Applications list – opting to install the appropriate provisioning profile if it has not been previously installed on the device. Finally, navigate to the application on your device, and start it up. Category:IOS